#ifndef _ODN_SCENE_SKELETON_H
#define _ODN_SCENE_SKELETON_H

//TODO: Fix this 
#define SKELETON_TAGMARKER 1

//Engine headers
#include "odn_scene_Scene.h"
#include "odn_phys_PhysicsModel.h"
#include "odn_phys_Bone.h"
#include "odn_scene_BoneMesh.h"

//Standard library headers 
#include <vector>

//TODO: Put skeleton into its own sub namespace 
/*
namespace ouden
{
	namespace scene
	{
		
		//Base skeleton object 
		class ODN_Skeleton : public ODN_SceneObject 
		{
			
		public:
			
			//Constructors and destructor 
			ODN_Skeleton(ODN_Scene* Scene) : ODN_SceneObject(Scene), pointcount(0), bonecount(0)		{}
			ODN_Skeleton(ODN_Scene* Scene, char* Filename)	: ODN_SceneObject(Scene), pointcount(0), bonecount(0)	{ loadSkeleton(Filename); }
			~ODN_Skeleton()										{}
			
			virtual bool Update()
			{
				
				//If ragdoll physics is turned on 
				if (ragdollon) 
					//Apply the ragdoll physics to the skeleton 
					doRagDoll();
				
			}
			
			//TODO: Fix this 
			bool loadSkeleton(char* Filename); 
			
		protected:
			
			//Apply ragdoll physics to the skeleton 
			void doRagDoll()
			{
				
				//Loop through points 
				for (int p=0;p<points.size();p++) {
					
					//Apply physics to the point by calling it's update function 
					points[p]->Update();
					
				}
				
				//Loop through bones
				for (int b=0;b<bones.size();b++) {
					
					//Apply constraint physics to bone points by calling it's update function 
					bones[b]->Update();
					
				}
				
			}
			
			//Number of points and bones in skeleton 
			//TODO: See if need these 
			int pointcount;
			int bonecount;
			
			//Array of parts that make up the skeleton 
			//std::vector<ODN_Point*>		 	points;
			//std::vector<ODN_DynamicPoint*> 	dynamicpoints;
			std::vector<ODN_Bone*> 			bones;
			
			//Array of graphical meshes fixed to bones 
			std::vector<ODN_BoneMesh*>		meshes;
			
		private:
			
			//Is ragdoll physics turned on for this skeleton? 
			bool ragdollon;
			
		};
		
	} //namespace scene 
} //namespace ouden 
*/
#endif //_ODN_SCENE_SKELETON_H 
